import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';

export const columns: BasicColumn[] = [
    {
    title: 'guid',
    dataIndex: 'guid'
   },
   {
    title: 'tag',
    dataIndex: 'tag'
   },
   {
    title: 'path',
    dataIndex: 'path'
   },
   {
    title: 'name',
    dataIndex: 'name'
   },
   {
    title: '（1 空间节点   2设备节点   3 点位节点）',
    dataIndex: 'nodeType'
   },
   {
    title: '删除状态',
    dataIndex: 'delFlag'
   },
   {
    title: '设备类型',
    dataIndex: 'deviceType'
   },
   {
    title: '上联设备guid。如有多个上联的，guid间用
英文逗号,隔开 ',
    dataIndex: 'link'
   },
   {
    title: 'parentGuid',
    dataIndex: 'parentGuid'
   },
];

export const searchFormSchema: FormSchema[] = [
 {
    label: 'guid',
    field: 'guid',
    component: 'Input'
  },
 {
    label: 'tag',
    field: 'tag',
    component: 'Input'
  },
];

export const formSchema: FormSchema[] = [
  // TODO 主键隐藏字段，目前写死为ID
  {label: '', field: 'id', component: 'Input', show: false},
  {
    label: 'guid',
    field: 'guid',
    component: 'Input',
  },
  {
    label: 'tag',
    field: 'tag',
    component: 'Input',
  },
  {
    label: 'path',
    field: 'path',
    component: 'Input',
  },
  {
    label: 'name',
    field: 'name',
    component: 'Input',
  },
  {
    label: '（1 空间节点   2设备节点   3 点位节点）',
    field: 'nodeType',
    component: 'InputNumber',
  },
  {
    label: '删除状态',
    field: 'delFlag',
    component: 'InputNumber',
  },
  {
    label: '设备类型',
    field: 'deviceType',
    component: 'Input',
  },
  {
    label: '上联设备guid。如有多个上联的，guid间用
英文逗号,隔开 ',
    field: 'link',
    component: 'Input',
  },
  {
    label: 'parentGuid',
    field: 'parentGuid',
    component: 'Input',
  },
];
